package lab02.Test06;

/**
 * Created by 唐苗苗 on 2017/10/15.
 */
public class Triangle {
    double length1;
    double length2;
    double length3;
    double high;
    boolean judge;


    double area(){
        high =((double) (length1 + length2 + length3))/2;
        return (float) Math.sqrt(high * (high - length2) * (high -length3));
    }
    double perimeter(){
        return length1 + length2 + length3;
    }
    void isjudge(){
        if (length1 + length2 < length3 || length1 + length3 < length2 || length2 + length3 < length1){
            System.out.println("不能构成三角形");
        }else System.out.println("可以构成三角形");
    }
}
